<?php
		//select value
		$conn = mysqli_connect("earth.cs.utep.edu","wb_epadilla2","123456abc");
        $conn->select_db("wb_epadilla2");         
		$command = "SELECT tProfile.iProfile,iTrader, sFirstName, sLastName FROM tProfile,tTraders ".
		"WHERE dAccepted IS NULL AND tProfile.iProfile=tTraders.iProfile_Source AND tTraders.iProfile=$iProfile ORDER BY sLastName ASC;";
		//query
		$result = $conn->query($command);
		//get all posts
        while ($row = $result->fetch_array(MYSQLI_ASSOC))
        {
			echo	"<tr>";
			echo		"<td>".$row['sFirstName']." ".$row['sLastName']."</td>";
			echo		"<td><a href=\"javascript:RespondToFriendRequest($iProfile,".$row['iTrader'].",'accepted')\">";
			echo			"<img src='accept.png' alt='edit' width='25'>";
			echo 		"</a></td>";
			echo		"<td><a href=\"javascript:RespondToFriendRequest($iProfile,".$row['iTrader'].",'rejected')\">";
			echo			"<img src='reject.png' alt='edit' width='25'>";
			echo 		"</a></td>";
			echo	"</tr>";
        }
        $conn->close();
?>	